﻿using Mododor.Models;
using Prism.Commands;
using Prism.Regions;
using System.Collections.ObjectModel;

namespace Mododor.ViewModels.CompanyInfoViewModels
{
    internal class CompanyViewModel
    {
        public DelegateCommand<NavigationModel> SelectionChangedCommand { get; set; }
        public ObservableCollection<NavigationModel> NavList { get; set; }
        public CompanyViewModel(IRegionManager region)
        {
            NavList = new ObservableCollection<NavigationModel>()
            {
                new NavigationModel()
                {
                     IconName="Domain",
                      ViewName="CompanyInfoView",
                       Name="客户公司"
                },
                new NavigationModel()
                {
                     IconName="Account",
                      ViewName="ClientInfoView",
                       Name="员工信息"
                }, 
                new NavigationModel()
                {
                     IconName="FileSign",
                      ViewName="ContractInfoView",
                       Name="合约信息"
                }
            };
            SelectionChangedCommand = new DelegateCommand<NavigationModel>((x) =>
            {
                region.Regions[Ext.ExtUrl.CompanyRegionContent].RequestNavigate(x.ViewName);
            });
        }
    }
}
